package xin.mashibo.genvictobutest.vo;

import android.os.Parcel;
import android.os.Parcelable;

import com.genvict.obusdk.data.CardConsumeRecord;

/**
 * @author MaShibo
 *         on 2018/3/27
 */
public class CardConsumeExtend extends CardConsumeRecord implements Parcelable {

    public CardConsumeExtend(CardConsumeRecord record) {
        setApplicationId(record.getApplicationId());
        setRecordLength(record.getRecordLength());
        setApplicationLockFlag(record.getApplicationLockFlag());
        setTollRoadNetworkId(record.getTollRoadNetworkId());
        setTollStationId(record.getTollStationId());
        setTollLaneId(record.getTollLaneId());
        setTimeUnix(record.getTimeUnix());
        setvehicleModel(record.getvehicleModel());
        setPassStatus(record.getPassStatus());
        setReserve1(record.getReserve1());
        setStaffNo(record.getStaffNo());
        setMtcSequenceNo(record.getMtcSequenceNo());
        setVehicleNumber(record.getVehicleNumber());
        setReserve2(record.getReserve2());
    }

    protected CardConsumeExtend(Parcel in) {
        setApplicationId(in.readString());
        setRecordLength(in.readString());
        setApplicationLockFlag(in.readString());
        setTollRoadNetworkId(in.readString());
        setTollStationId(in.readString());
        setTollLaneId(in.readString());
        setTimeUnix(in.readString());
        setvehicleModel(in.readString());
        setPassStatus(in.readString());
        setReserve1(in.readString());
        setStaffNo(in.readString());
        setMtcSequenceNo(in.readString());
        setVehicleNumber(in.readString());
        setReserve2(in.readString());
    }

    public static final Creator<CardConsumeExtend> CREATOR = new Creator<CardConsumeExtend>() {
        @Override
        public CardConsumeExtend createFromParcel(Parcel in) {
            return new CardConsumeExtend(in);
        }

        @Override
        public CardConsumeExtend[] newArray(int size) {
            return new CardConsumeExtend[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(getApplicationId());
        dest.writeString(getRecordLength());
        dest.writeString(getApplicationLockFlag());
        dest.writeString(getTollRoadNetworkId());
        dest.writeString(getTollStationId());
        dest.writeString(getTollLaneId());
        dest.writeString(getTimeUnix());
        dest.writeString(getvehicleModel());
        dest.writeString(getPassStatus());
        dest.writeString(getReserve1());
        dest.writeString(getStaffNo());
        dest.writeString(getMtcSequenceNo());
        dest.writeString(getVehicleNumber());
        dest.writeString(getReserve2());
    }
}
